<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用鼠标事件完成拖动</title>
    <style>
        div.photos {
            position: relative;
            width: 1000px;
            height: 1000px;
            background-color: lightpink;
        }

        img[src='1.jpg'] {
            width: 100px;
            height: 100px;
            position: absolute;
            left: 0;
            top: 0;
            cursor: move;
        }
    </style>
</head>


<body>
<section>
    <h1>来拖动我吧</h1>
    <div class="photos">
        <img src="1.jpg" alt="photo">
    </div>
</section>

<script src="mouseEvent.js"></script>

</body>
</html>